<!DOCTYPE html>
<html>
<head>
    <title>Simple app</title>

    <script type="text/javascript" src="lib/angular.js"></script>
    <script type="text/javascript">
        var app = angular.module("app", []);
        app.controller('MyController', function ($scope, $parse) {
            $scope.$watch('expr', function (newVal, oldVal, scope) {
                if (newVal !== oldVal) {
                        // Let's set up our parseFun with the expression
                    var parseFun = $parse(newVal);
                        // Get the value of the parsed expression
                    $scope.parsedValue = parseFun(scope);
                }
            });
        });
    </script>
</head>
<body ng-app="app">


<div class="container" ng-controller="TextAreaWithLimitCtrl">
    <div class="row">
        <textarea ng-model="message">{{message}}</textarea>
    </div>
    <div class="row">
        <button ng-click="send()">Send</button>
        <button ng-click="clear()">Clear</button>
    </div>
</div>

</body>
</html>